package ViewFillperProject.v;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.widget.ImageView;

public class MainActivity extends Activity {
	private ImageView imageView;
	private AlphaAnimation animation;
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        imageView=(ImageView) findViewById(R.id.imageView);
        animation=new AlphaAnimation(0.0f,1.0f);
        animation.setDuration(5000);
        imageView.setAnimation(animation);
        addListener();
    }
    public void addListener(){
    	animation.setAnimationListener(new AnimationListener() {
			
			public void onAnimationStart(Animation animation) {
				
			}
			
			public void onAnimationRepeat(Animation animation) {
				
			}
			
			public void onAnimationEnd(Animation animation) {
				 Intent intent=new Intent(MainActivity.this,LoginActivity.class);
                   startActivity(intent);	
                   MainActivity.this.finish();
			}
		});
    }
}